<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="pragram" content="no-cache">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title></title>
    <link href="__PUBLIC__/Home/css/style.css" rel="stylesheet" type="text/css">
    <link href="__PUBLIC__/Home/css/iconfont.css" rel="stylesheet" type="text/css">
    <script src="__PUBLIC__/Home/js/jquery-1.11.1.min.js"></script>
    <script src="__PUBLIC__/Home/js/publicjquery.js"></script>
    <script src="__PUBLIC__/Home/js/layer/layer.js" ></script>
    <script src="__PUBLIC__/Home/js/common.js" ></script>
    <script src="__PUBLIC__/Home/js/ajaxfileupload.js" ></script>
</head>
<style>
    .main {margin: 0;}
    .content {margin: 0;}
    .head-content {padding: 0;}
    span {display:inline-block;padding-left: 10px;}
    *{box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;}
</style>
<body onselectstart="return false">
<div class="main FromUpToDown" style="height: 400px;width:500px;min-width:500px;" >
    <div class="content" style="position: relative" >
        <div class="head-content" style="height: 30px;background-color: #BFD4F0;font-size: 14px">
                <span style="line-height: 30px;">选择号码</span>
                <button onclick="send()" style="float:right;background: #3ece67;height:22px;border:none;padding:0 10px;border-radius: 3px;margin-top: 4px;cursor:pointer;color:#fff;margin-right: 10px;">发送</button>
        </div>
        <div style="height: 370px" class="table-list">
            <table cellpadding="0" cellspacing="0">
                <thead>
                <tr >
                    <th>序号</th>
                    <th>手机号</th>
                    <th>订单号</th>
                </tr>
                </thead>
                <foreach name='list' key="k" item='vo'>
                    <tr >
                        <td><{$k+1}> <input checked value="<{$vo['id']}>" type="checkbox"> </td>
                        <td><{$vo['phone']}></td>
                        <td><{$vo['no']}></td>
                    </tr>
                </foreach>
            </table>
        </div>
    </div>
</div>
<script>
    function send()
    {
        var ids = [];
        $("input:checkbox:checked").each(function(){
            ids.push($(this).val());
        });
        if(!ids){
            layer.msg('请选择要发送的记录!',{time:1000});
            return ;
        }
        $.post(
                "<{:U('Voice/index')}>",
                {
                  ids:ids
                },function(res){
                    if(res.status == 1){
                        layer.msg(res.info,{time:1000});
                        setTimeout("window.parent.location.reload()",1000);
                    }else{
                        layer.msg(res.info,{time:5000});
                    }
                }
        )
    }

   // console.info(window.parent.location.reload());
</script>
</body>
</html>